import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'
import Dashboard from '@/views/dashboard'
import warehouseManagement from '@/views/warehouseManagement'
import LoginA from '@/views/loginA.vue'
import NewAdd from '@/views/newAdd.vue'
import regionManagement from '@/views/regionManagement'
import updata from '@/views/warehouseManagement/components/updata.vue'
import locationManagement from '@/views/locationManagement'
import newUpdate from '@/views/newUpdate.vue'
import newABC from '@/views/newABC.vue'
import updateABC from '@/views/updateABC.vue'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    // name: 'layout',
    component: Layout,
    redirect: '/dashboard',
    children: [
      { path: 'dashboard', component: Dashboard },
      { path: 'warehouseManagement', component: warehouseManagement },
      { path: 'locationManagement', component: locationManagement },
      { path: 'regionManagement', component: regionManagement },
      { path: 'newAdd', component: NewAdd },
      { path: 'newABC', component: newABC },
      { path: 'newUpdate', component: newUpdate },
      { path: 'updateABC', component: updateABC },
      { path: 'updata', component: updata }
    ]
  },
  {
    path: '/loginA',
    // name: 'loginA',
    component: LoginA
  }
]

const router = new VueRouter({
  routes
})

export default router
